<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> 
<%@ taglib uri="http://www.springframework.org/tags" prefix="spring" %>
<%@ taglib uri="/tld/pager.tld" prefix="pager"%> 
<%@ taglib uri="/tld/id2name.tld" prefix="id2name"%> 
<%@ taglib uri="/tld/code2name.tld" prefix="code2name"%> 
<html>
  <head>
    <base href="<%=basePath%>">
    	<meta http-equiv="X-UA-Compatible" content="IE=edge,Chrome=1" />
	    <link href="<%=basePath%>bs/css/bootstrap.min.css" rel="stylesheet" media="screen">
	    <script type="text/javascript" src="<%=basePath%>js/jquery-1.11.3.min.js"></script>
	    <script type="text/javascript" src="<%=basePath%>bs/js/bootstrap.min.js"></script>
	<meta name="Cache-Control" content="public" />
	
    <title>TbDeviceMsg</title>
    
	<script type="text/javascript">
	var basePath = "<%=basePath%>";
	function del(id){
		$.get("<%=basePath%>tbDeviceMsg/delTbDeviceMsg?id=" + id,function(data){
			if("success" == data.result){
				alert("deleted success");
				window.location.reload();
			}else{
				alert("deleted failure");
			}
		});
	}
</script>
  </head>
  
  <body>
  <div class="container-fluid">
	<div class="row-fluid">
		<div class="span12">
			<form action="<%=basePath%>tbDeviceMsg/getAllTbDeviceMsg" method="post" name="tbDeviceMsgForm" id="tbDeviceMsgForm">
				<fieldset>
					 <legend>from</legend>
					 <label></label><input type="text" name="addTimeBegin" value="<spring:eval expression="tbDeviceMsg.addTimeBegin" />">
					 					   <input type="text" name="addTimeEnd" value="<spring:eval expression="tbDeviceMsg.addTimeEnd" />">
					 <button type="submit" >submit</button>
				</fieldset>
			</form>
		</div>
	</div>
  </div>
  <br>
  <div class="container-fluid">
	<div class="row-fluid">
		<div class="span11">
			<table class="table table-hover table-bordered">
				<thead>
					<tr>
						<th>帧头</th>
						<th>长度</th>
						<th>协议版本</th>
						<th>控制码</th>
						<th>帧类别</th>
						<th>消息时间戳</th>
						<th>保留字段</th>
						<th>源地址</th>
						<th>目的地址</th>
						<th>帧内容</th>
						<th>消息ID</th>
						<th>校验和</th>
						<th>入库时间</th>
						<th>operate</th>
					</tr>
				</thead>
				<tbody>
					<c:if test="${!empty tbDeviceMsgList }">
					<c:forEach items="${tbDeviceMsgList }" var="tbDeviceMsg">
						<tr>
							<td>${tbDeviceMsg.msgHead}</td>
							<td>${tbDeviceMsg.msgLength}</td>
							<td>${tbDeviceMsg.msgProtocolVersion}</td>
							<td>${tbDeviceMsg.msgCtrlCode}</td>
							<td>${tbDeviceMsg.msgFrameType}</td>
							<td>${tbDeviceMsg.msgTimeStamp}</td>
							<td>${tbDeviceMsg.msgSpare}</td>
							<td>${tbDeviceMsg.msgSourceAddress}</td>
							<td>${tbDeviceMsg.msgDestAddress}</td>
							<td>${tbDeviceMsg.msgFrameContent}</td>
							<td>${tbDeviceMsg.msgId}</td>
							<td>${tbDeviceMsg.msgChecksum}</td>
							<td><spring:eval expression="tbDeviceMsg.addTime"/></td>
							<td>
							<a href="tbDeviceMsg/getTbDeviceMsg?id=${tbDeviceMsg.id}">edit</a>
							<a href="javascript:del('${tbDeviceMsg.id}')">del</a>
							</td>
						</tr>
					</c:forEach>
					</c:if>
					</tbody>
				</table>
				<pager:createPager pageUrl="tbDeviceMsg/getAllTbDeviceMsg" formId="tbDeviceMsgForm" pageSize="${mypage.pageSize}" totalPage="${mypage.totalPage}" totalCount="${mypage.totalCount}" curPage="${mypage.curPage}" 	totalCountTimeMillis="${mypage.totalCountTimeMillis}"/> 
			</div>
		</div>
	</div>

  </body>
</html>
